package openapi

import (
    "log"
    "os/exec"
)

func GenerateSwagger() {
    cmd := exec.Command("swagger", "generate", "spec", "-o", "swagger.yaml")
    err := cmd.Run()
    if err != nil {
        log.Fatalf("Failed to generate Swagger spec: %v", err)
    }
    log.Println("Swagger spec generated successfully")
}